package com.yantong.mapper;

import com.yantong.pojo.Agent;
import com.yantong.pojo.AgentExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;
import java.util.Map;

public interface AgentMapper {
    int countByExample(AgentExample example);

    int deleteByExample(AgentExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Agent record);

    int insertSelective(Agent record);

    List<Agent> selectByExample(AgentExample example);

    Agent selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Agent record, @Param("example") AgentExample example);

    int updateByExample(@Param("record") Agent record, @Param("example") AgentExample example);

    int updateByPrimaryKeySelective(Agent record);

    int updateByPrimaryKey(Agent record);

    List<Agent> selectByExample(AgentExample agentExample, RowBounds rowBounds);

    Agent getByUserId(Long userId);

    int countByMap(Map<String, Object> map);

    List<Agent> selectByMap(Map<String, Object> map, RowBounds rowBounds);

    Agent selectNotDeleteByKey(Long agentId);

    /**
      * 查询代理总数
      */
    int getAgentCount(Long userId, int level);


}